home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
COMM
/
DTR
/
DTR.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1992-07-04
|
894b
|
33 lines
Uses DTRCTRL;
Var
COMPort : Byte;
Error : Integer;
State : String;
Begin
State := ParamStr (2);
WriteLn ('DTR Control utility');
WriteLn ('Les Logiciels de Marque inc.');
WriteLn;
Val (ParamStr (1), COMPort, Error);
If (COMPort < 1) or (COMPOrt > 4) or ((UpCase (State [1]) <> 'D') And (UpCase (State [1]) <> 'R')) Then Begin
WriteLn (' * Usage:');
WriteLn (' DTR [Port] [D/R]');
WriteLn (' D = Drop DTR');
WriteLn (' R = Raise DTR');
Halt;
End;
If UpCase (State [1]) = 'D' Then Begin
DTRControl (COMPort, False);
WriteLn (' * DTR is now OFF');
End else Begin
DTRControl (COMPort, True);
WriteLn (' * DTR is now ON');
End;
End.